package com.example.core.controller;

import com.example.core.feign.TestFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/test")
@Slf4j
public class TestController extends BaseController {

    @Resource
    private TestFeignService testFeignService;

    @PostMapping("/getmsg")
    public String getTest(@RequestBody String value) {
        log.info("调用接口，test，value:{}", value);
        return "ccc";
    }

    @PostMapping("/get")
    public String get(@RequestBody String abc) {
        testFeignService.getTest(abc);
        return "";
    }
}
